﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SyndicateDAO.DAO;
using SyndicateDAO.DatabaseObject;


namespace SyndicateBusiness.Classes
{
    public class LineBL
    {
        private LineDAO LineDAO = new LineDAO();
        private PlayerDAO PlayerDAO = new PlayerDAO();
        private DrawDAO DrawDAO = new DrawDAO();
        public line GetSingle(int id)
        {
            return LineDAO.SelectSingle(id);
        }

        public IQueryable<line> SelectAllByDrawId(int dId)
        {
            return LineDAO.SelectAllByDrawId(dId);
        }

        public IQueryable<line> SelectAllByDrawIdAndNumbers(int dId,string numbers)
        {
            return LineDAO.SelectAllByDrawId(dId).ToList().Where(l => l.numbers == numbers).AsQueryable();
        }
        

        public bool InsertLine(line l)
        {
            return LineDAO.InsertLine(l);
        }
        public bool UpdateLine()
        {
            return LineDAO.UpdateLine();
        }
        public bool DeleteLine(line l)
        {
            return LineDAO.DeleteLine(l);
        }
    }
}
